package com.timk.goserver.client.ui.widgets;

import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.FocusWidget;

/** Command for setting focus to a widget */
public class FocusCommand implements Command {
	private final FocusWidget widget;
	
	/**
	 * Creates a FocusCommand
	 * @param widget the widget that gets the focus
	 */
	public FocusCommand(FocusWidget widget) {
		this.widget = widget;
	}
	
	public void execute() {
		widget.setFocus(true);
	}
}
